package com.jy.wms.web;

import com.jy.wms.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/*
* 周转箱管理
* */
@Controller
@RequestMapping("/box")
public class WmsBoxRouter {
    @Autowired
    SysMenuService menuService;
    //主页面
    @RequestMapping(value = "/turnoverbox/{menu}")
    public String toBox(@PathVariable String menu, Model model) {
        model.addAttribute("functions",menuService.getFunctions(menu));
        return "base/box/box";
    }
    //周转箱增加页面
    @RequestMapping(value = "/addBox")
    public String addKq() {
        return "base/box/addBox";
    }

    /*跳转到修改周转箱页面*/
    @RequestMapping(value = "/editBox")
    public String editBox(String id, Model model) {
        model.addAttribute("id",id);
        return "base/box/updateBox";
    }
    /*添加箱数  */
    @RequestMapping(value = "/addBoxNumber")
    public String addBoxNumber(String id, Model model) {
        model.addAttribute("id",id);
        return "base/box/addBoxNumber";
    }
    /*扣减箱数  */
    @RequestMapping(value = "/updateBoxNumber")
    public String updateBoxNumber(String id, Model model) {
        model.addAttribute("id",id);
        return "base/box/removeBoxNumber";
    }
    /*查看周转箱详情*/
    @RequestMapping(value = "/getFindBox")
    public String getFindBox(String id, Model model) {
        model.addAttribute("id",id);
        return "base/box/box_xiangxi";
    }

}
